package org.feiye.studyday23;

public class StringTest {

	public static void main(String[] args) {
		String s = new String(new byte[] { 48, 89, 122 });
		System.out.println(s);
		String s1 = new String(new char[] { 21016, 21017, 21018 });
		System.out.println(s1);
		System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><>>>>>><");
		String s2 = "我喜欢Java";
		byte[] bytes = s2.getBytes();
		for (byte b : bytes) {
			System.out.print(b + "  ");
		}
		System.out.println();
		char[] charArray = s2.toCharArray();
		for (char c : charArray) {
			System.out.print(c + " = " + (int) c + "  ");
		}
	}

}
